﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tradex.Market {

    /// <summary>
    /// These flags indicate certain conditions with an InstrumentActivity report. Some are relevant only for live feeds,
    /// some also for or during backtesting.
    /// </summary>
    [FlagsAttribute()]
    public enum InstrumentActivityFlags {

        /// <summary>
        /// The data is delayed. This flag is only relevant for real time feeds and indicates that for some reason the
        /// data was delivered delayed from the infrastructure. Trading algorythms should use this flag to suspend themselves
        /// (as the data is not arriving in real time). THis is not an indicator of an exchange level condition.
        /// 
        /// Example: when the internet connection breaks down on the NxCore feed, after reestablicshing it will catch up.
        /// During catch up all data will be marked as Delayed, once NxCore switches ofer to real time, the data will be
        /// not marked anymore.
        /// 
        /// On playback, the data will never have this mark
        /// </summary>
        DataDelayed = 0x8000,

        /// <summary>
        /// The data is marked as suspicious by the infrastructure. This means it is a possibly invalid element.
        /// 
        /// Example: sometimes in forex single trades happen way outside of the bid/ask. This can be a trade error,
        /// or a data entry error from a manual source.
        /// </summary>
        DataSuspicious = 0x4000,

        /// <summary>
        /// This flag indicates a fast market, as per exchange flags. As such, the prices and volumes are only "best efforts".
        /// 
        /// This flag will / should only occur on open outcry non electronig markets. It is legal condition and part of the
        /// official quote
        /// </summary>
        FastMarket = 0x0001

    }

}
